var z = new zjm();
$("#login").click(function () {
    var username = $("#username").val();
    var password = $("#password").val();
    login(username, password);
});
function login(username, password) {
    $("#username").val();
    var data = {
        username: username,
        password: password
    }
    data = JSON.stringify(data);
    z.ax(
        "post",
        "/user/login",
        data,
        res
    )
}
function res(res) {
    if (res.status == 401) {
        console.log("登录失败");
    } else if (res == true) {
        console.log("登录成功");
    }
}